﻿using GWB.Application.System.MenuManage.Dtos;
using GWB.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GWB.Application.System.MenuManage.MenuService
{
    public interface IMenuService
    {
        /// <summary>
        ///新增
        /// </summary>
        /// <param name="inputDto"></param>
        /// <returns></returns>
        Task<MenuOutDto> Add(MenuCreateOrUpdateInputDto inputDto);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="inputDto"></param>
        /// <returns></returns>
        Task<bool> Update(MenuCreateOrUpdateInputDto inputDto);


        /// <summary>
        /// 编辑分配的菜单（租户 角色）
        /// </summary>
        /// <param name="inputDto"></param>
        /// <returns></returns>
        Task<bool> EditAssignMenu(OwnerMenuEditInputDto inputDto);



        /// <summary>
        ///查询菜单（递归）
        /// </summary>
        /// <returns></returns>
        Task<List<MenuOutDto>> GetMenuList();

       
        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<bool> Delete(List<long> ids);

        /// <summary>
        /// 获取开放的方法的分类
        /// </summary>
        /// <returns></returns>
        List<string> GetActionClassList();

        /// <summary>
        /// 获取分类下面的开放方法
        /// </summary>
        /// <returns></returns
        Task<List<ActionOutDto>> QueryActionList(List<string> inputDto);

        /// <summary>
        /// 编辑菜单的Action
        /// </summary>
        /// <returns></returns>
        Task<bool> EditMenuBindingAction(MenuBindingActionEditInputDto inputDto);


        /// <summary>
        /// 获取菜单绑定的Action
        /// </summary>
        /// <param name="menuId"></param>
        /// <returns></returns>
        Task<MenuBindingActionOutDto> GetMenuBindingAction(long menuId);

        /// <summary>
        /// 获取绑定菜单的Action
        /// </summary>
        /// <param name="menuIds"></param>
        /// <returns></returns>
         Task<List<MenuBindingActionOutDto>> GetMenuBindingAction(List<long> menuIds);
    }
}
